Data manipulation

Load organ registration data

organ =
  read_csv("./data/organ.csv") %>% 
  filter(county != "TOTAL NYS") 
## Parsed with column specification:
## cols(
##   pop_2012 = col_integer(),
##   chart_month = col_character(),
##   county = col_character(),
##   eligible_population_enrolled = col_double(),
##   location = col_character(),
##   month = col_integer(),
##   opo = col_character(),
##   population_18_estimate = col_integer(),
##   registry_enrollments = col_integer(),
##   year = col_integer(),
##   dummy_day = col_character(),
##   date = col_date(format = "")
## )

Load demographic data

demo_ny = 
  read.csv("./data/ahrf_select_data.csv") %>% as.tibble() %>% 
  janitor::clean_names() %>% 
  rename(county = county_name) 

Note that there is a sudden leap in registry enrollments at 2017-10-1:

county_enrollment_plot = 
  organ %>% 
  ggplot(aes(x = date, y = registry_enrollments, color = county)) +
    geom_line() 
ggplotly(county_enrollment_plot)
<<<<<<< HEAD
=======
>>>>>>> 552cbca9b4d51bf3aa73d83ff51f914f9fa736e7
county_enrollment_rate_plot = 
  organ %>% 
  ggplot(aes(x = date, y = eligible_population_enrolled, color = county)) +
    geom_line() 
ggplotly(county_enrollment_rate_plot)
<<<<<<< HEAD
=======
>>>>>>> 552cbca9b4d51bf3aa73d83ff51f914f9fa736e7
population_enrollment_plot =  
  organ %>% 
  ggplot(aes(y = registry_enrollments, x = population_18_estimate, color = county)) +
    geom_point() 
ggplotly(population_enrollment_plot)
<<<<<<< HEAD
=======
>>>>>>> 552cbca9b4d51bf3aa73d83ff51f914f9fa736e7
# There was a huge leap in pupulation_18_estimate at 2017-10-01 among almost all the counties
organ %>%
  # only use data after 2017-10-01
  filter(date > '2017-10-01') %>% 
  mutate(text_label = str_c("Eligible pop:", population_18_estimate, '\nregistry_enrollments: ', registry_enrollments, "\nCounty:", county, "\ndate:", date)) %>% 
  plot_ly(x = ~population_18_estimate, y = ~registry_enrollments, type = "scatter", mode = "markers",
          #alpha = 0.5, 
          color = ~county,
          text = ~text_label)
## Warning in RColorBrewer::brewer.pal(N, "Set2"): n too large, allowed maximum for palette Set2 is 8
## Returning the palette you asked for with that many colors

## Warning in RColorBrewer::brewer.pal(N, "Set2"): n too large, allowed maximum for palette Set2 is 8
## Returning the palette you asked for with that many colors
<<<<<<< HEAD
# use the data of Sep 2018
organ_2018_sep =
=======

To fit a regression model, use the data of Sep 2018 only.

organ_2018_sep =
>>>>>>> 552cbca9b4d51bf3aa73d83ff51f914f9fa736e7
  organ %>%
  filter(date > '2017-10-01') %>% 
  filter(month == 9) 

fit = lm(registry_enrollments ~ population_18_estimate, data = organ_2018_sep)
organ_2018_sep %>% 
  mutate(text_label = str_c("Eligible pop:", population_18_estimate, '\nregistry_enrollments: ', registry_enrollments, "\nCounty:", county, "\ndate:", date)) %>% 
  plot_ly(x = ~population_18_estimate, y = ~registry_enrollments, mode = "markers") %>% 
  add_markers(y = ~registry_enrollments) %>% 
  add_trace(x = ~population_18_estimate, y = fitted(fit), mode = "lines") %>%
  layout(showlegend = F)
## No trace type specified:
##   Based on info supplied, a 'scatter' trace seems appropriate.
##   Read more about this trace type -> https://plot.ly/r/reference/#scatter
<<<<<<< HEAD
=======
>>>>>>> 552cbca9b4d51bf3aa73d83ff51f914f9fa736e7

This plot doesn’t show much information.

organ_df_sep = 
  organ %>% 
  group_by(county, year) %>% 
  arrange(county, date) %>% 
  mutate(prop_reg_enroll = registry_enrollments / population_18_estimate)
 
organ_df_sep %>% 
  ggplot(aes(x = year, y = prop_reg_enroll, group = county, color = county)) +
  geom_line()

combine the demo and donor datasets.

variables_list = read_csv("./data/ahrf_selected_variables.csv")$label
## Parsed with column specification:
## cols(
##   label = col_character(),
##   topic = col_character()
## )
regression_df = 
  inner_join(by = 'county', organ_2018_sep, demo_ny) %>% 
  select(opo, population_18_estimate, registry_enrollments, eligible_population_enrolled,
         standardzd_per_capita_medcr_cost_fee_for_service_2015:percent_educ_hlth_care_soc_asst_2011_15) %>% 
<<<<<<< HEAD
  mutate(opo = as.factor(opo)) %>% 
  mutate(pop_total_2015 = pop_total_female_2015 + pop_total_male_2015,
         male_proportion_2015 = pop_total_male_2015 / pop_total_2015,
         white_proportion_2015 = (pop_white_female_2015 + pop_white_male_2015) / pop_total_2015,
         black_proportion_2015 = (pop_black_african_amer_female_2015 + pop_black_african_amer_male_2015) / pop_total_2015
         
  )
plot = 
  regression_df %>% 
  ggplot(aes(y = registry_enrollments, x = pop_total_2015)) +
  geom_point()
ggplotly(plot)
# medicare enrollment is strongly associated with donor registration rate
regression_df %>% 
  lm(registry_enrollments ~  population_18_estimate + pop_total_2015 * medicare_enrollment_aged_tot_2015 + x_persons_25_w_4_yrs_college_2011_15+ male_proportion_2015 + white_proportion_2015 + black_proportion_2015 + percent_educ_hlth_care_soc_asst_2011_15 + opo , data = .) %>% # broom::tidy()
  summary()
## 
## Call:
## lm(formula = registry_enrollments ~ population_18_estimate + 
##     pop_total_2015 * medicare_enrollment_aged_tot_2015 + x_persons_25_w_4_yrs_college_2011_15 + 
##     male_proportion_2015 + white_proportion_2015 + black_proportion_2015 + 
##     percent_educ_hlth_care_soc_asst_2011_15 + opo, data = .)
## 
## Residuals:
##    Min     1Q Median     3Q    Max 
## -68775  -2968    -10   4201  45219 
## 
## Coefficients:
##                                                    Estimate Std. Error
## (Intercept)                                      -7.501e+03  2.028e+05
## population_18_estimate                            8.604e-01  1.834e-01
## pop_total_2015                                    7.794e-01  1.849e-01
## medicare_enrollment_aged_tot_2015                -1.086e+00  2.882e-01
## x_persons_25_w_4_yrs_college_2011_15              7.097e+02  5.570e+02
## male_proportion_2015                              2.333e+05  4.211e+05
## white_proportion_2015                            -2.202e+05  1.844e+05
## black_proportion_2015                            -3.403e+04  3.325e+05
## percent_educ_hlth_care_soc_asst_2011_15          -7.539e+02  8.523e+02
## opoFinger Lakes Donor Recovery Network            5.804e+03  6.175e+03
## opoNew York Organ Donor Network                  -1.968e+04  1.490e+04
## opoUNYTS                                          1.173e+04  8.693e+03
## pop_total_2015:medicare_enrollment_aged_tot_2015 -9.604e-09  2.248e-08
##                                                  t value Pr(>|t|)    
## (Intercept)                                       -0.037 0.970648    
## population_18_estimate                             4.692 2.36e-05 ***
## pop_total_2015                                     4.216 0.000112 ***
## medicare_enrollment_aged_tot_2015                 -3.768 0.000458 ***
## x_persons_25_w_4_yrs_college_2011_15               1.274 0.208913    
## male_proportion_2015                               0.554 0.582267    
## white_proportion_2015                             -1.194 0.238525    
## black_proportion_2015                             -0.102 0.918904    
## percent_educ_hlth_care_soc_asst_2011_15           -0.885 0.380897    
## opoFinger Lakes Donor Recovery Network             0.940 0.352083    
## opoNew York Organ Donor Network                   -1.321 0.192942    
## opoUNYTS                                           1.349 0.183740    
## pop_total_2015:medicare_enrollment_aged_tot_2015  -0.427 0.671153    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 18880 on 47 degrees of freedom
## Multiple R-squared:  0.9826, Adjusted R-squared:  0.9782 
## F-statistic: 221.7 on 12 and 47 DF,  p-value: < 2.2e-16
======= mutate(opo = fct_relevel(opo, "New York Organ Donor Network")) %>% mutate( pop_total_2015 = (pop_total_female_2015 + pop_total_male_2015) , percent_male_2015 = (100 * (pop_total_male_2015 / pop_total_2015)) %>% round(., digits = 2), percent_white_2015 = (100 * (pop_white_female_2015 + pop_white_male_2015) / pop_total_2015) %>% round(., digits = 2), percent_black_2015 = (100 * (pop_black_african_amer_female_2015 + pop_black_african_amer_male_2015) / pop_total_2015) %>% round(., digits = 2) , percent_asian_2015 = (100 * (pop_asian_female_2015 + pop_asian_male_2015) / pop_total_2015) %>% round(., digits = 2), percent_medicare_enrollment_2015 = (medicare_enrollment_aged_tot_2015 * 100 / pop_total_2015) %>% round(., digits = 2) ) %>% select(-(pop_total_male_2015:pop_asian_female_2015), -population_estimate_2016, -medicare_enrollment_aged_tot_2015) %>% select(eligible_population_enrolled, everything()) %>% rename(percent_enrolled = eligible_population_enrolled)
## Warning: Column `county` joining character vector and factor, coercing into
## character vector
# regression_df %>% View
# regression_df %>% str

Fit a model

>>>>>>> 552cbca9b4d51bf3aa73d83ff51f914f9fa736e7
regression_df %>% 
  select(-opo) %>% 
  cor()
##                                                       percent_enrolled
## percent_enrolled                                            1.00000000
## population_18_estimate                                     -0.63490860
## registry_enrollments                                       -0.49158996
## standardzd_per_capita_medcr_cost_fee_for_service_2015      -0.71517542
## median_age_2010                                             0.34454090
## percent_persons_25_w_hs_diploma_2011_15                    -0.63120091
## percent_persons_25_w_4_yrs_college_2011_15                 -0.16628458
## percent_educ_hlth_care_soc_asst_2011_15                    -0.00394551
## pop_total_2015                                             -0.64393914
## percent_male_2015                                           0.32319406
## percent_white_2015                                          0.70400981
## percent_black_2015                                         -0.68582797
## percent_asian_2015                                         -0.57600794
## percent_medicare_enrollment_2015                            0.51446805
##                                                       population_18_estimate
## percent_enrolled                                                 -0.63490860
## population_18_estimate                                            1.00000000
## registry_enrollments                                              0.94582698
## standardzd_per_capita_medcr_cost_fee_for_service_2015             0.69146325
## median_age_2010                                                  -0.41670095
## percent_persons_25_w_hs_diploma_2011_15                           0.46307285
## percent_persons_25_w_4_yrs_college_2011_15                        0.48888029
## percent_educ_hlth_care_soc_asst_2011_15                          -0.06983545
## pop_total_2015                                                    0.99908123
## percent_male_2015                                                -0.49973737
## percent_white_2015                                               -0.86726622
## percent_black_2015                                                0.79371160
## percent_asian_2015                                                0.80989287
## percent_medicare_enrollment_2015                                 -0.46814424
##                                                       registry_enrollments
## percent_enrolled                                               -0.49158996
## population_18_estimate                                          0.94582698
## registry_enrollments                                            1.00000000
## standardzd_per_capita_medcr_cost_fee_for_service_2015           0.63491378
## median_age_2010                                                -0.39008831
## percent_persons_25_w_hs_diploma_2011_15                         0.27915137
## percent_persons_25_w_4_yrs_college_2011_15                      0.61397806
## percent_educ_hlth_care_soc_asst_2011_15                        -0.08077614
## pop_total_2015                                                  0.93857345
## percent_male_2015                                              -0.51746669
## percent_white_2015                                             -0.77408127
## percent_black_2015                                              0.71329807
## percent_asian_2015                                              0.71166104
## percent_medicare_enrollment_2015                               -0.41644654
##                                                       standardzd_per_capita_medcr_cost_fee_for_service_2015
## percent_enrolled                                                                                -0.71517542
## population_18_estimate                                                                           0.69146325
## registry_enrollments                                                                             0.63491378
## standardzd_per_capita_medcr_cost_fee_for_service_2015                                            1.00000000
## median_age_2010                                                                                 -0.29045851
## percent_persons_25_w_hs_diploma_2011_15                                                          0.39235752
## percent_persons_25_w_4_yrs_college_2011_15                                                       0.35055102
## percent_educ_hlth_care_soc_asst_2011_15                                                         -0.08339607
## pop_total_2015                                                                                   0.70075487
## percent_male_2015                                                                               -0.37455895
## percent_white_2015                                                                              -0.70612601
## percent_black_2015                                                                               0.71811157
## percent_asian_2015                                                                               0.52190295
## percent_medicare_enrollment_2015                                                                -0.47386090
##                                                       median_age_2010
## percent_enrolled                                            0.3445409
## population_18_estimate                                     -0.4167010
## registry_enrollments                                       -0.3900883
## standardzd_per_capita_medcr_cost_fee_for_service_2015      -0.2904585
## median_age_2010                                             1.0000000
## percent_persons_25_w_hs_diploma_2011_15                    -0.2651434
## percent_persons_25_w_4_yrs_college_2011_15                 -0.3314566
## percent_educ_hlth_care_soc_asst_2011_15                    -0.4463922
## pop_total_2015                                             -0.4206015
## percent_male_2015                                           0.2491281
## percent_white_2015                                          0.5758090
## percent_black_2015                                         -0.5285397
## percent_asian_2015                                         -0.4685420
## percent_medicare_enrollment_2015                            0.8510414
##                                                       percent_persons_25_w_hs_diploma_2011_15
## percent_enrolled                                                                  -0.63120091
## population_18_estimate                                                             0.46307285
## registry_enrollments                                                               0.27915137
## standardzd_per_capita_medcr_cost_fee_for_service_2015                              0.39235752
## median_age_2010                                                                   -0.26514343
## percent_persons_25_w_hs_diploma_2011_15                                            1.00000000
## percent_persons_25_w_4_yrs_college_2011_15                                        -0.30073461
## percent_educ_hlth_care_soc_asst_2011_15                                           -0.09713816
## pop_total_2015                                                                     0.47387774
## percent_male_2015                                                                 -0.02960253
## percent_white_2015                                                                -0.56172408
## percent_black_2015                                                                 0.63397442
## percent_asian_2015                                                                 0.25743312
## percent_medicare_enrollment_2015                                                  -0.33455700
##                                                       percent_persons_25_w_4_yrs_college_2011_15
## percent_enrolled                                                                      -0.1662846
## population_18_estimate                                                                 0.4888803
## registry_enrollments                                                                   0.6139781
## standardzd_per_capita_medcr_cost_fee_for_service_2015                                  0.3505510
## median_age_2010                                                                       -0.3314566
## percent_persons_25_w_hs_diploma_2011_15                                               -0.3007346
## percent_persons_25_w_4_yrs_college_2011_15                                             1.0000000
## percent_educ_hlth_care_soc_asst_2011_15                                                0.2607478
## pop_total_2015                                                                         0.4741145
## percent_male_2015                                                                     -0.5255911
## percent_white_2015                                                                    -0.4751449
## percent_black_2015                                                                     0.3545907
## percent_asian_2015                                                                     0.5943618
## percent_medicare_enrollment_2015                                                      -0.2574109
##                                                       percent_educ_hlth_care_soc_asst_2011_15
## percent_enrolled                                                                  -0.00394551
## population_18_estimate                                                            -0.06983545
## registry_enrollments                                                              -0.08077614
## standardzd_per_capita_medcr_cost_fee_for_service_2015                             -0.08339607
## median_age_2010                                                                   -0.44639223
## percent_persons_25_w_hs_diploma_2011_15                                           -0.09713816
## percent_persons_25_w_4_yrs_college_2011_15                                         0.26074785
## percent_educ_hlth_care_soc_asst_2011_15                                            1.00000000
## pop_total_2015                                                                    -0.06043419
## percent_male_2015                                                                 -0.15108991
## percent_white_2015                                                                -0.11954539
## percent_black_2015                                                                 0.08104906
## percent_asian_2015                                                                 0.10408561
## percent_medicare_enrollment_2015                                                  -0.25301343
##                                                       pop_total_2015
## percent_enrolled                                         -0.64393914
## population_18_estimate                                    0.99908123
## registry_enrollments                                      0.93857345
## standardzd_per_capita_medcr_cost_fee_for_service_2015     0.70075487
## median_age_2010                                          -0.42060147
## percent_persons_25_w_hs_diploma_2011_15                   0.47387774
## percent_persons_25_w_4_yrs_college_2011_15                0.47411452
## percent_educ_hlth_care_soc_asst_2011_15                  -0.06043419
## pop_total_2015                                            1.00000000
## percent_male_2015                                        -0.49932871
## percent_white_2015                                       -0.87055919
## percent_black_2015                                        0.80373659
## percent_asian_2015                                        0.80057431
## percent_medicare_enrollment_2015                         -0.47338872
##                                                       percent_male_2015
## percent_enrolled                                             0.32319406
## population_18_estimate                                      -0.49973737
## registry_enrollments                                        -0.51746669
## standardzd_per_capita_medcr_cost_fee_for_service_2015       -0.37455895
## median_age_2010                                              0.24912805
## percent_persons_25_w_hs_diploma_2011_15                     -0.02960253
## percent_persons_25_w_4_yrs_college_2011_15                  -0.52559114
## percent_educ_hlth_care_soc_asst_2011_15                     -0.15108991
## pop_total_2015                                              -0.49932871
## percent_male_2015                                            1.00000000
## percent_white_2015                                           0.45614358
## percent_black_2015                                          -0.43553012
## percent_asian_2015                                          -0.44596854
## percent_medicare_enrollment_2015                             0.12674505
##                                                       percent_white_2015
## percent_enrolled                                               0.7040098
## population_18_estimate                                        -0.8672662
## registry_enrollments                                          -0.7740813
## standardzd_per_capita_medcr_cost_fee_for_service_2015         -0.7061260
## median_age_2010                                                0.5758090
## percent_persons_25_w_hs_diploma_2011_15                       -0.5617241
## percent_persons_25_w_4_yrs_college_2011_15                    -0.4751449
## percent_educ_hlth_care_soc_asst_2011_15                       -0.1195454
## pop_total_2015                                                -0.8705592
## percent_male_2015                                              0.4561436
## percent_white_2015                                             1.0000000
## percent_black_2015                                            -0.9523469
## percent_asian_2015                                            -0.8055503
## percent_medicare_enrollment_2015                               0.5969293
##                                                       percent_black_2015
## percent_enrolled                                             -0.68582797
## population_18_estimate                                        0.79371160
## registry_enrollments                                          0.71329807
## standardzd_per_capita_medcr_cost_fee_for_service_2015         0.71811157
## median_age_2010                                              -0.52853969
## percent_persons_25_w_hs_diploma_2011_15                       0.63397442
## percent_persons_25_w_4_yrs_college_2011_15                    0.35459069
## percent_educ_hlth_care_soc_asst_2011_15                       0.08104906
## pop_total_2015                                                0.80373659
## percent_male_2015                                            -0.43553012
## percent_white_2015                                           -0.95234686
## percent_black_2015                                            1.00000000
## percent_asian_2015                                            0.60124031
## percent_medicare_enrollment_2015                             -0.57056349
##                                                       percent_asian_2015
## percent_enrolled                                              -0.5760079
## population_18_estimate                                         0.8098929
## registry_enrollments                                           0.7116610
## standardzd_per_capita_medcr_cost_fee_for_service_2015          0.5219029
## median_age_2010                                               -0.4685420
## percent_persons_25_w_hs_diploma_2011_15                        0.2574331
## percent_persons_25_w_4_yrs_college_2011_15                     0.5943618
## percent_educ_hlth_care_soc_asst_2011_15                        0.1040856
## pop_total_2015                                                 0.8005743
## percent_male_2015                                             -0.4459685
## percent_white_2015                                            -0.8055503
## percent_black_2015                                             0.6012403
## percent_asian_2015                                             1.0000000
## percent_medicare_enrollment_2015                              -0.4557122
##                                                       percent_medicare_enrollment_2015
## percent_enrolled                                                             0.5144680
## population_18_estimate                                                      -0.4681442
## registry_enrollments                                                        -0.4164465
## standardzd_per_capita_medcr_cost_fee_for_service_2015                       -0.4738609
## median_age_2010                                                              0.8510414
## percent_persons_25_w_hs_diploma_2011_15                                     -0.3345570
## percent_persons_25_w_4_yrs_college_2011_15                                  -0.2574109
## percent_educ_hlth_care_soc_asst_2011_15                                     -0.2530134
## pop_total_2015                                                              -0.4733887
## percent_male_2015                                                            0.1267450
## percent_white_2015                                                           0.5969293
## percent_black_2015                                                          -0.5705635
## percent_asian_2015                                                          -0.4557122
## percent_medicare_enrollment_2015                                             1.0000000
lm(percent_enrolled ~ ., regression_df) %>% summary
## 
## Call:
## lm(formula = percent_enrolled ~ ., data = regression_df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -7.5463 -2.2341 -0.1135  2.1545  7.2236 
## 
## Coefficients:
##                                                         Estimate
## (Intercept)                                            6.381e+01
## opoCenter for Donation and Transplant in New York      7.300e+00
## opoFinger Lakes Donor Recovery Network                 1.141e+01
## opoUNYTS                                               1.111e+01
## population_18_estimate                                 8.188e-05
## registry_enrollments                                  -5.186e-05
## standardzd_per_capita_medcr_cost_fee_for_service_2015 -4.786e-04
## median_age_2010                                       -8.650e-01
## percent_persons_25_w_hs_diploma_2011_15               -9.051e-01
## percent_persons_25_w_4_yrs_college_2011_15             3.189e-01
## percent_educ_hlth_care_soc_asst_2011_15               -1.975e-01
## pop_total_2015                                        -4.774e-05
## percent_male_2015                                      1.114e+00
## percent_white_2015                                    -5.947e-01
## percent_black_2015                                    -6.577e-01
## percent_asian_2015                                    -1.797e+00
## percent_medicare_enrollment_2015                       1.375e+00
##                                                       Std. Error t value
## (Intercept)                                            7.061e+01   0.904
## opoCenter for Donation and Transplant in New York      2.773e+00   2.632
## opoFinger Lakes Donor Recovery Network                 3.035e+00   3.759
## opoUNYTS                                               3.541e+00   3.138
## population_18_estimate                                 6.152e-05   1.331
## registry_enrollments                                   2.932e-05  -1.769
## standardzd_per_capita_medcr_cost_fee_for_service_2015  1.145e-03  -0.418
## median_age_2010                                        3.903e-01  -2.216
## percent_persons_25_w_hs_diploma_2011_15                3.773e-01  -2.399
## percent_persons_25_w_4_yrs_college_2011_15             1.742e-01   1.830
## percent_educ_hlth_care_soc_asst_2011_15                2.105e-01  -0.938
## pop_total_2015                                         4.371e-05  -1.092
## percent_male_2015                                      4.964e-01   2.245
## percent_white_2015                                     5.793e-01  -1.027
## percent_black_2015                                     7.029e-01  -0.936
## percent_asian_2015                                     7.149e-01  -2.514
## percent_medicare_enrollment_2015                       4.511e-01   3.049
##                                                       Pr(>|t|)    
## (Intercept)                                            0.37120    
## opoCenter for Donation and Transplant in New York      0.01174 *  
## opoFinger Lakes Donor Recovery Network                 0.00051 ***
## opoUNYTS                                               0.00307 ** 
## population_18_estimate                                 0.19021    
## registry_enrollments                                   0.08400 .  
## standardzd_per_capita_medcr_cost_fee_for_service_2015  0.67809    
## median_age_2010                                        0.03202 *  
## percent_persons_25_w_hs_diploma_2011_15                0.02086 *  
## percent_persons_25_w_4_yrs_college_2011_15             0.07411 .  
## percent_educ_hlth_care_soc_asst_2011_15                0.35334    
## pop_total_2015                                         0.28085    
## percent_male_2015                                      0.02999 *  
## percent_white_2015                                     0.31036    
## percent_black_2015                                     0.35462    
## percent_asian_2015                                     0.01576 *  
## percent_medicare_enrollment_2015                       0.00392 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.835 on 43 degrees of freedom
## Multiple R-squared:  0.8324, Adjusted R-squared:   0.77 
## F-statistic: 13.35 on 16 and 43 DF,  p-value: 8.456e-12
  # use 'New York Organ Donor Network' as the reference group for opo
lm(percent_enrolled ~ opo + percent_medicare_enrollment_2015 + percent_male_2015 + percent_white_2015*percent_persons_25_w_hs_diploma_2011_15 + percent_persons_25_w_4_yrs_college_2011_15, data = regression_df) %>% 
  summary()
## 
## Call:
## lm(formula = percent_enrolled ~ opo + percent_medicare_enrollment_2015 + 
##     percent_male_2015 + percent_white_2015 * percent_persons_25_w_hs_diploma_2011_15 + 
##     percent_persons_25_w_4_yrs_college_2011_15, data = regression_df)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -6.2528 -2.5272  0.0803  1.9416  8.1039 
## 
## Coefficients:
##                                                              Estimate
## (Intercept)                                                -1.180e+02
## opoCenter for Donation and Transplant in New York           8.206e+00
## opoFinger Lakes Donor Recovery Network                      1.319e+01
## opoUNYTS                                                    1.371e+01
## percent_medicare_enrollment_2015                            7.321e-01
## percent_male_2015                                           1.620e+00
## percent_white_2015                                          6.608e-01
## percent_persons_25_w_hs_diploma_2011_15                     2.156e+00
## percent_persons_25_w_4_yrs_college_2011_15                  3.808e-01
## percent_white_2015:percent_persons_25_w_hs_diploma_2011_15 -3.428e-02
##                                                            Std. Error
## (Intercept)                                                 2.932e+01
## opoCenter for Donation and Transplant in New York           1.893e+00
## opoFinger Lakes Donor Recovery Network                      1.932e+00
## opoUNYTS                                                    2.336e+00
## percent_medicare_enrollment_2015                            2.383e-01
## percent_male_2015                                           4.223e-01
## percent_white_2015                                          1.625e-01
## percent_persons_25_w_hs_diploma_2011_15                     6.586e-01
## percent_persons_25_w_4_yrs_college_2011_15                  1.100e-01
## percent_white_2015:percent_persons_25_w_hs_diploma_2011_15  8.028e-03
##                                                            t value
## (Intercept)                                                 -4.026
## opoCenter for Donation and Transplant in New York            4.334
## opoFinger Lakes Donor Recovery Network                       6.830
## opoUNYTS                                                     5.867
## percent_medicare_enrollment_2015                             3.072
## percent_male_2015                                            3.835
## percent_white_2015                                           4.067
## percent_persons_25_w_hs_diploma_2011_15                      3.274
## percent_persons_25_w_4_yrs_college_2011_15                   3.463
## percent_white_2015:percent_persons_25_w_hs_diploma_2011_15  -4.270
##                                                            Pr(>|t|)    
## (Intercept)                                                0.000193 ***
## opoCenter for Donation and Transplant in New York          7.06e-05 ***
## opoFinger Lakes Donor Recovery Network                     1.11e-08 ***
## opoUNYTS                                                   3.52e-07 ***
## percent_medicare_enrollment_2015                           0.003434 ** 
## percent_male_2015                                          0.000353 ***
## percent_white_2015                                         0.000169 ***
## percent_persons_25_w_hs_diploma_2011_15                    0.001928 ** 
## percent_persons_25_w_4_yrs_college_2011_15                 0.001106 ** 
## percent_white_2015:percent_persons_25_w_hs_diploma_2011_15 8.72e-05 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 3.509 on 50 degrees of freedom
## Multiple R-squared:  0.8368, Adjusted R-squared:  0.8075 
## F-statistic: 28.49 on 9 and 50 DF,  p-value: < 2.2e-16